<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/public/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>资质合同</title>
<%
	request.setAttribute("menu", 1);
%>
<%@ include file="/WEB-INF/page/public/contentmeta.jsp"%>
<script type="text/javascript" src="<%=basePath%>js/insert.js?v=8"></script>
<link rel="stylesheet" href="<%=basePath%>css/global.css" media="all" />
<link rel="stylesheet"
	href="<%=basePath%>plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="<%=basePath%>css/tab.css" media="all" />

<style type="text/css">
.layui-form-label i {
	color: red;
	padding-right: 3px;
}
.htlayui-disabled, .htlayui-disabled:hover {
    color: black;
    background-color:#e4e4e4;
    cursor: not-allowed;
}
</style>

</head>
<body>

	<input type="hidden" id="successlog" value="${successlog}">
	<input type="hidden" value="${customertype}" id="customertype">

 

	<!-- 合同详情弹框 -->
	<div id="TM-layui-hetong" >
		<div class="TM-he-tong admin-entering">
			<form class="layui-form TM-entering-form" action="" id="hetongform"
				novalidate="novalidate">
				<div class="form-left">
					<div class="layui-form-item">
						<label class="layui-form-label">企业名称 :</label> 
						<div class="layui-input-block htqyname"> ${cusinfo.cname}</div>
						<input type="hidden" name="cusid"  value="${cusinfo.id}" id="qyid">
						 <input type="hidden" name="uids"  value="0"  >
						  <input type="hidden" name="cids"  value="0"  >
						  <input type="hidden" name="otmoney"  value="0"  >
						 <input type="hidden" name="advancemoney"  value="0"  >
						  <input type="hidden" name="titleremark"  value="0"  >
						 <input type="hidden" name="zsremark"  value="0"  >
						  <input type="hidden" name="totalms"  value="0"  >
						   <input type="hidden" name="alonems"  value="0"  >
						  
						 
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label"><i>*</i><span>服务费用 : </span></label>
						<div class="layui-input-block">
							<input type="text" name="servicecharge" id="servicecharge"
								 autocomplete="off" class="layui-input ">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label"><i>*</i><span>签订时间
								:</span> </label>
						<div class="layui-input-block">
							<input type="text" name="signingtime" id="signingtime"
								readonly="readonly" placeholder="yyyy-mm-dd" autocomplete="off"
								class="layui-input" onclick="layui.laydate({elem: this})">
						</div>
					</div>
				</div>
				<div class="form-right">
					<div class="layui-form-item">
						<label class="layui-form-label"><i>*</i><span>合同金额
								: </span></label>
						<div class="layui-input-block">
							<input type="text" name="totalamount" id="totalamount"
								  autocomplete="off" class="layui-input ">
						</div>
					</div>
					<div class="layui-form-item warehouse">
						<label class="layui-form-label"><i>*</i><span>合同类型:
						</span></label>
						<div class="layui-input-block">
							<select name="contracttype" lay-filter="contracttype">
								<dic:cf type="2" name="contract_type" value="0" />
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label"><i>*</i><span>签订年限
								: </span></label>
						<div class="layui-input-block">
							<select name="lifetype" lay-filter="lifetype">
								<dic:cf type="2" name="life_type" value="1" />
							</select>
						</div>
					</div>
				</div>
				<div class="layui-form-item TM-hetong-jilu">
					<label class="layui-form-label">合同备注 : </label>
					<div class="layui-input-block">
						<textarea placeholder="请输入内容" name="remark" class="layui-textarea"></textarea>
					</div>
				</div>
				 
				 
				 
			</form>
		</div>
	</div>

	<!-- 添加证书弹框 -->
	<div id="TM-layui-zhengshu" style="display: none;">
		<div class="tab-condition" style="margin-left: 35px;">
			<form class="layui-form clefix" action="" id="zssearch">
				<div class="layui-form-item">
					<div class="layui-input-block">
						<input type="text" name="keyWord" id="zskeyword"
							autocomplete="off" placeholder="请输入关键字" class="layui-input">
						<input type="hidden" id="skpg" name="skipToPage" value="1">

					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<select name="state" class="" lay-filter="state">
							<option value="-1" selected="">成熟等级</option>
							<option value="0"
								<c:if test="${cuinfo.state==0 || state == 0}">selected</c:if>>最新资源</option>
							<option value="1"
								<c:if test="${cuinfo.state==1 || state == 1}">selected</c:if>>意向不明</option>
							<option value="2"
								<c:if test="${cuinfo.state==2 || state == 2}">selected</c:if>>意向明确</option>
							<option value="3"
								<c:if test="${cuinfo.state==3 || state == 3}">selected</c:if>>意向强烈</option>
							<option value="7"
								<c:if test="${cuinfo.state==7 || state == 7}">selected</c:if>>合作客户</option>
						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<button class="layui-btn TM-btn-search zssearchbtn" type="button">
						<i class="layui-icon layui-unselect layui-tab-close">&#xe615;</i>搜索
					</button>
					<button class="layui-btn TM-btn-search zscleanbtn" type="button">
						<i class="layui-icon layui-unselect layui-tab-close">&#xe615;</i>清空
					</button>
				</div>
			</form>
		</div>
		<div class="entering">
			<table class="site-table table-hover TM-table3"
				style="width: 90%; margin: 0 auto;">
				<thead>
					<tr>
						<th style="width: 102px;">是否垫款</th>
						<th style="width: 122px;">客户名称</th>
						<th style="width: 100px;">垫款总额</th>
						<th style="width: 172px;">身份证号</th>
						<th style="width: 172px;">所属人</th>
						<th style="width: 171px;">所在库</th>
						<th style="width: 101px;">操作</th>
					</tr>
				</thead>
				<tbody class="tb_customerzs">
				</tbody>
			</table>
			<div class="admin-table-page">
				<div id="zspage" class="page"></div>
			</div>
		</div>
	</div>
	
	<!-- 资源导入弹窗 -->
	<div id="insertdiv" style="display: none;">
		<form id="insertform" action="/systerm/uploadexcel" method="post"
			enctype="multipart/form-data">
			<div style="margin-top: 20px; font-size: 18px; text-align: center;">
				<div>
					<blockquote class="layui-elem-quote"><a href="<%=basePath%>upload/enterprise.xlsx"><b>点击下载</b></a>模版，填写完成后点击上传。</blockquote>
				</div>
				<div style="margin-top: 10px;">
					<input type="file" id="file" name="file" style="border: 1px solid #e6e6e6; height: 31px;"> 
					<input type="hidden" id="filetype" name="type" value="${customertype}">
					<input type="hidden" id="filestate" name="state" value="${customerstate}">
				</div>
			</div>
		</form>
	</div>


	<script id="zslb" type="text/html"> 
{{#  layui.each(d.resultList, function(index, item){ }} 
<tr  >
					<td>{{# if(item.advancemoney>0){ }}<span style="color:red;">已垫款</span> {{#  } else { }} 未垫款 {{#  } }} </td>
		                <td>{{item.cname}}</td>
						<td>{{item.advancemoney}}</td>
						<td>{{item.idcard}}</td>
		                <td>{{item.createusersname}}</td>
		              	<td>{{# if(item.state==1){ }} 意向不明 {{#  } }} {{#  if(item.state==7){ }} 合作客户 {{#  } }}{{#  if(item.state==2){ }} 意向明确{{#  } }}{{#  if(item.state==3){ }} 意向强烈{{#  } }}{{#  if(item.state==0){ }} 最新资源{{#  } }}</td>
		                <td>
                           <button class="layui-btn layui-btn-primary layui-btn-small addzs" data="{'id':'{{item.id}}','uid':'{{item.uid}}','name':'{{item.cname}}','createname':'{{item.createusersname}}','advancemoney':'{{item.advancemoney}}'}"   type="button">添加<i class="layui-icon"></i></button>
		                </td>
	               	</tr>
 
{{#  }); }}  
</script>


	<script id="zs" type="text/html"> 
					<tr class="zs{{d.id}}" data="{{d.id}}">
		                <td  >{{d.name}}</td>
		                <td><input type="text" value="" name="totalms"  style="width:60px;height:25px;">&nbsp;<label>/元</label>  <span id="othermy{{d.id}}"  style="display:none">&nbsp;&nbsp;&nbsp;&nbsp;<label>其它费用:</label><input type="text" value="0" name="otmoney"  style="width:60px;height:25px;">&nbsp;<label>/元</label><span>   <input type="hidden"   name="uids" value="{{d.uid}}"  > <input type="hidden"   name="cids" value="{{d.id}}"  ><input type="hidden"   name="advancemoney" value="{{d.advancemoney}}"  ></td>
		                <td><input type="text" value="" name="alonems"  style="width:60px;height:25px;">&nbsp;<label>/元</label></td>
						<td><input type="text" value="" name="zsremark"  style="width:100%;height:25px;"></td>
						<td>{{d.createname}}</td>
		                <td>
							<div class="layui-btn-group">
								<button class="layui-btn layui-btn-primary layui-btn-small addothermoney"  data="{{d.id}}" type="button">  <i class="layui-icon">&#xe654;</i>  </button>
								<button class="layui-btn layui-btn-primary layui-btn-small deletezs" data="{{d.id}}" type="button">  <i class="layui-icon">&#xe640;</i>  </button>
                            </div>
		                </td>
	               	</tr>	
	</script>
	<script type="text/javascript" src="<%=basePath%>js/customercontracttemp1-0.js?v=<%=callcenterstate%>14"></script>
	<script type="text/javascript" src="<%=basePath%>js/monitor.js"></script>
	<script type="text/javascript">
		
	</script>
</body>
</html>